var http = require("http")
var fs = require("fs")
var server = http.createServer();
server.on("request", function (req, res) {
   fs.readFile('demo1.txt', function (err, data) {
      if (err) {
         res.end("失败")
      } else {
         res.setHeader("content-type", "text/plain; charset=utf-8")
         res.end(data)
      }
   })
})
server.listen(4090, function () {
   console.log("已启动");
})